<template>
  <div class="uploader-list minio-section" v-show="fileList.length > 0">
    
      <div class="minio-section-header">下载列表</div>
      <ul v-if="this.uploader.saveType == 'blob'">
       
        <li v-for="(file,index) in fileList" :key="file.uid" style=" margin-bottom: 4px;">
          <download-file-blob :file="file" :index="index" :list="true"></download-file-blob>
        </li>
      </ul>
    <ul v-else>
       
        <li v-for="(file,index) in fileList" :key="file.uid" style=" margin-bottom: 4px;">
          <download-file :file="file" :index="index" :list="true"></download-file>
        </li>
      </ul>
  </div>
</template>

<script>
  import { uploaderMixin } from '../common/mixins'
  import DownloadFile from './downloadFile.vue'
 import DownloadFileBlob from './downloadFileBlob.vue'
  const COMPONENT_NAME = 'download-list'

  export default {
    name: COMPONENT_NAME,
    mixins: [uploaderMixin],
    computed: {
      fileList () {
        let vm = this
        
        
        return this.uploader.dowloadList
      }
    },
    components: {
      DownloadFile,DownloadFileBlob
    }
  }
</script>


<style lang="less" scoped>
  .uploader-files {
    position: relative;
  }
  .uploader-files > ul {
    list-style: none;
    margin: 0;
    padding: 0
  }
    @import '../assets/common.less';
</style>